// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import ElementUI from 'element-ui';
import App from './App'
import i18n from './locales'
import VueI18n from 'vue-i18n'

import './utils/filters' // global filter
/* 路由 */
import router from './router'
// vuex
import store from './store'

/* bootstarp */
import './assets/css/bootstrap.min.css'
/* ElementUI */
import 'element-ui/lib/theme-chalk/index.css';

import '@/style/index.scss'

import '@/utils/style.js'


Vue.$a = 'aaaaaa'

Vue.config.productionTip = false

Vue.use(ElementUI);
// Vue.use(VueI18n);


router.beforeEach( async (to, from, next) => {
  // if(!store.getters.qiniu)
  // // await store.dispatch('other/setInfo')
  // console.log(store.getters.qiniu)
  if(to.meta.title){
      document.title = to.meta.title
    }
    next();
});


new Vue({
  el: '#app',
  i18n,
  router,
  store,
  components: { App },
  template: '<App/>'
})
